home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / NeXT-Icons / next-icon@gun.com / Apps / ImagePortfolio / Portfolio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-03  |  3.1 KB  |  107 lines

  1. // -------------------------------------------------------------------------------------
  2. // Portfolio.h
  3. // -------------------------------------------------------------------------------------
  4.  
  5. extern "Objective-C" {
  6. #import <mach/cthreads.h>
  7. #import <objc/Object.h>
  8. }
  9.  
  10. #import "ParseString.h"
  11.  
  12. // -------------------------------------------------------------------------------------
  13. // file name linked list
  14. typedef struct fileLIST_s {
  15.     ParseString            list;
  16.     int                    flags;
  17.     struct fileLIST_s    *next;
  18. } fileLIST;
  19.  
  20. // -------------------------------------------------------------------------------------
  21. @interface Portfolio : Object
  22. {
  23.  
  24.     char            *sourceFile;                // source file name
  25.     BOOL            abortLoad;                    // abort/flush file loading
  26.     BOOL            allowDrop;                    // register for file drop from Workspace
  27.     BOOL            isActivePortfolio;            // active portfolio
  28.     BOOL            adjustPreferences;            // allow pref adjustment
  29.     id                fileIcon;                    // file representation icon
  30.   
  31.     mutex_t            loadMutex;                    // load list lock
  32.     fileLIST        *loadList;                    // file name linked list
  33.  
  34.     id                paletteWindow;                // icon Palette panel
  35.     NXSize            minWindowSize;                // minimum window size for current cell size
  36.     NXSize            minCellSize;                // minimum cell size
  37.     NXSize            windowOverhead;                // delta size between window and contentView
  38.     BOOL            isRegistered;                // true if window is registered for dragging
  39.  
  40.     id                expandImage;                // expanded view object
  41.   
  42.     id                paletteScroll;                // icon Palette scroller
  43.     id                iconButtonId;                // workspace icon view button
  44.     id                iconBoxId;                    // icon view button box
  45.     id                iconPathId;                    // image path name outlet
  46.     id                iconSizeId;                    // image size outlet
  47.     id                iconColors;                    // image colors outlet
  48.     id                iconMatrix;                    // icon Palette matrix
  49.  
  50.     id                windowHeader;                // image infor header box
  51.     NXSize            headerSize;                    // size of window header
  52.   
  53. }
  54.  
  55. // -------------------------------------------------------------------------------------
  56.  
  57. // instance initialization
  58. - init;
  59. - initFromList:(const ParseString*)fileNames;
  60. - initFromList:(const ParseString*)fileNames registerWindow:(BOOL)regWindow;
  61. + firstInstance;
  62.  
  63. // active portfolio
  64. - becomeActivePortfolio:sender;
  65. - resignActivePortfolio:sender;
  66. - (BOOL)isActivePortfolio;
  67. + makeActivePortfolio:(Portfolio*)portObj;
  68. + activePortfolio;
  69.  
  70. // button/menu actions
  71. - show:sender;
  72. - open:sender;
  73. - save:sender;
  74. - saveAs:sender;
  75. - saveDefaults:sender;
  76.  
  77. // document status methods
  78. + (BOOL)isDocEdited;
  79. - (BOOL)isDocEdited;
  80. - (BOOL)isLoading;
  81.  
  82. // font methods
  83. - font;
  84. - setFont:fontObj;
  85.  
  86. // non-scaled image view methods
  87. - expandImage;
  88. - showLargeImage:sender;
  89.  
  90. // window size constraints
  91. - getWindowSize:(NXSize*)windowSize forCellSize:(NXSize*)cellSize gap:(NXSize*)gapSize
  92.         rows:(int)rows cols:(int)cols;
  93. - getDisplayedRows:(int*)rows cols:(int*)cols;
  94. - (NXSize*)cellSize;
  95.     
  96. // PaletteCell delegate methods
  97. - loadFileString:(const char*)fileString :(BOOL)openDoc :(BOOL)chkExtn;
  98. - loadFileList:(const ParseString*)fileNames :(BOOL)openDoc :(BOOL)chkExtn;
  99. - cellBecameSelected:imageCell;
  100. - cellResignedSelected:imageCell;
  101.  
  102. // icon dragging delegate support
  103. - _registerWindow;
  104. - _unregisterWindow;
  105.  
  106. @end
  107.